package com.xhwl.data.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xhwl.common.pojo.cent.sdata.Account;
import com.xhwl.common.pojo.cent.sdata.AccountProject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author:
 * @create: 2020-11-25
 **/
@RestController
public interface IAccountProjectService extends IService<AccountProject> {

    List<Integer> list(Integer accountId, List<Integer> projectIdList);

    void insert(Integer accountId, List<Integer> projectIdList);

    void delete(List<Integer> accountIdList, List<Integer> projectIdList);

    void deleteBatch(List<AccountProject> accountProjects);

    List<AccountProject> findByProjectIds(Integer accountId, List<Integer> projectIdList);

    /**
     * 根据帐号查询项目
     */
    @PostMapping(value = "/accountProject-service/find-byaccount")
    List<Integer> findByAccount(@RequestPart Account account);

}
